TK!2
=v
#1
:n
y
:v
.2860998977187273
:s
i
#2
:n
iy
:v
.6020116715706293
:s
i
#3
:n
x
:v
.4
:s
o
#4
:n
ix
:v
.6
:s
o
=u
=l
=f
#1
:n
csin
:c
Sine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#2
:n
ccos
:c
Cosine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#3
:n
ctan
:c
Tangent of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#4
:n
casin
:c
Arc sine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#5
:n
cacos
:c
Arc cosine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#6
:n
catan
:c
Arc tangent of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#7
:n
csqrt
:c
Square root of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#8
:n
cexp
:c
Exponential function of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#9
:n
cln
:c
Logarithmic function of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#10
:n
csinh
:c
Hyperbolic sine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#11
:n
ccosh
:c
Hyperbolic cosine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#12
:n
ctanh
:c
Hyperbolic tangent of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#13
:n
casinh
:c
Hyperbolic arc sine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#14
:n
cacosh
:c
Hyperbolic arc cosine of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#15
:n
catanh
:c
Hyperbolic arc tangent of complex argument
:t
Rule
:a
x,ix
:v
y,iy
#16
:n
power2
:c
m/n power of complex argument
:t
Rule
:a
x,ix,m,n
:v
y,iy
#17
:n
cpoly
:c
Polynomial function of complex argument, Horner's rule
:t
Procedure
:i
x,ix,c
:o
y,iy
#1
:n
csin
:z
(y,iy) = (sin(x)*cosh(ix),cos(x)*sinh(ix))
ptor(exp(-ix),x) = (-iy,y) + csqrt(1-y^2+iy^2,-2*y*iy)

" Note: The inverse function, (x,ix)=casin(y,iy), is a multiple-valued
"       function, i.e. actual modulus may be a sum of the principal
"       value x and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < x <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#2
:n
ccos
:z
(y,iy) = (cos(x)*cosh(ix),-sin(x)*sinh(ix))
ptor(exp(-ix),x) = (y,iy) + csqrt(y^2-iy^2-1,2*y*iy)

" Note: The inverse function, (x,ix)=cacos(y,iy), is a multiple-valued
"       function, i.e. actual modulus may be a sum of the principal
"       value x and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < x <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#3
:n
ctan
:z
d = cos(2*x) + cosh(2*ix)
(y,iy) = (sin(2*x)/d,sinh(2*ix)/d)
ptor(exp(-2*ix),2*x) = (1-iy,y)/(1+iy,-y)

" Note: The inverse function, (x,ix)=catan(y,iy), is a multiple-valued
"       function, i.e. actual modulus may be a sum of the principal
"       value y and any multiple of ã. This Rule Function returns
"       the principal value from the interval  -ã/2 < x <= ã/2 .
/E
E
#4
:n
casin
:z
ptor(exp(-iy),y) = (-ix,x) + csqrt(1-x^2+ix^2,-2*x*ix)
(x,ix) = (sin(y)*cosh(iy),cos(y)*sinh(iy))

" Note: The arc sine function, (y,iy)=casin(x,ix), is a multiple-valued
"       function, i.e. actual modulus may be a sum of the principal
"       value y and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < y <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#5
:n
cacos
:z
ptor(exp(-iy),y) = (x,ix) + csqrt(x^2-ix^2-1,2*x*ix)
(x,ix) = (cos(y)*cosh(iy),-sin(y)*sinh(iy))

" Note: The arc cosine function, (y,iy)=cacos(x,ix), is a multiple-valued
"       function, i.e. actual modulus may be a sum of the principal
"       value y and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < y <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#6
:n
catan
:z
ptor(exp(-2*iy),2*y) = (1-ix,x)/(1+ix,-x)
d = cos(2*y) + cosh(2*iy)
(x,ix) = (sin(2*y)/d,sinh(2*iy)/d)

" Note: The arc tangent function, (y,iy)=catan(x,ix), is a multiple-valued
"       function, i.e. actual modulus may be a sum of the principal
"       value y and any multiple of ã. This Rule Function returns
"       the principal value from the interval  -ã/2 < y <= ã/2 .
/E
E
#7
:n
csqrt
:z
(x,ix) = ptor(r,é)
(y,iy) = ptor(sqrt(r),é/2)

" Note: This function has two roots. The second root may be evaluated from
"       the rule  (y2,yi2) = - ptor(sqrt(r),é/2) ; the resulting values
"       y2=-y and yi2=-yi.
/E
E
#8
:n
cexp
:z
(y,iy) = ptor(exp(x),ix)

" Note: The inverse function, (x,ix)=cln(y,iy), is a multiple-valued
"       function, i.e. actual amplitude may be a sum of the principal
"       value ix and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < xi <= ã .
/E
E
#9
:n
cln
:z
(x,ix) = ptor(exp(y),iy)

" Note: The logarithmic function, (y,iy)=cln(x,ix), is a multiple-valued
"       function, i.e. actual amplitude may be a sum of the principal
"       value iy and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < yi <= ã .
/E
E
#10
:n
csinh
:z
(y,iy) = (sinh(x)*cos(ix),cosh(x)*sin(ix))
ptor(exp(x),ix) = (y,iy) + csqrt(1+y^2-iy^2,2*y*iy)

" Note: The inverse function, (x,ix)=casinh(y,iy), is a multiple-valued
"       function, i.e. actual amplitude may be a sum of the principal
"       value x and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < xi <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#11
:n
ccosh
:z
(y,iy) = (cosh(x)*cos(ix),sinh(x)*sin(ix))
ptor(exp(x),ix) = (y,iy) + csqrt(y^2-iy^2-1,2*y*iy)

" Note: The inverse function, (x,ix)=cacosh(y,iy), is a multiple-valued
"       function, i.e. actual amplitude may be a sum of the principal
"       value x and any multiple of 2ã. This Rule Function returns
"       the principal value from the interval  -ã < xi <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#12
:n
ctanh
:z
d = cosh(2*x) + cos(2*ix)
(y,iy) = (sinh(2*x)/d,sin(2*ix)/d)
ptor(exp(2*x),2*ix) = (1+y,iy)/(1-y,-iy)

" Note: The inverse function, (x,ix)=catanh(y,iy), is a multiple-valued
"       function, i.e. actual amplitude may be a sum of the principal
"       value y and any multiple of ã. This Rule Function returns
"       the principal value from the interval  -ã/2 < xi <= ã/2 .
/E
E
#13
:n
casinh
:z
ptor(exp(y),iy) = (x,ix) + csqrt(1+x^2-ix^2,2*x*ix)
(x,ix) = (sinh(y)*cos(iy),cosh(y)*sin(iy))

" Note: The hyperbolic arc sine function, (y,iy)=casinh(x,ix), is a 
"       multiple-valued function, i.e. actual amplitude may be a sum of 
"       the principal value x and any multiple of 2ã. This Rule Function 
"       returns the principal value from the interval  -ã < xi <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#14
:n
cacosh
:z
ptor(exp(y),iy) = (x,ix) + csqrt(x^2-ix^2-1,2*x*ix)
(x,ix) = (cosh(y)*cos(iy),sinh(y)*sin(iy))

" Note: The hyperbolic arc sine function, (y,iy)=cacosh(x,ix), is a 
"       multiple-valued function, i.e. actual amplitude may be a sum of 
"       the principal value x and any multiple of 2ã. This Rule Function 
"       returns the principal value from the interval  -ã < xi <= ã .
" Required function: csqrt (square root of complex argument)
/E
E
#15
:n
catanh
:z
ptor(exp(2*y),2*iy) = (1+x,ix)/(1-x,-ix)
d = cosh(2*y) + cos(2*iy)
(x,ix) = (sinh(2*y)/d,sin(2*iy)/d)

" Note: The hyperbolic arc tangent function, (y,iy)=catanh(x,ix), is a 
"       multiple-valued function, i.e. actual amplitude may be a sum of 
"       the principal value x and any multiple of ã. This Rule Function 
"       returns the principal value from the interval  -ã/2 < xi <= ã/2 .
/E
E
#16
:n
power2
:z
mn = m/n
(x,ix) = ptor(r,é)
(y,iy) = ptor(r^mn,é*mn)

" Notes: The function                  m/n
"                       (y,iy) = (x,ix)      is not invertible;
"
"        m  and  n  must be positive integers.
/E
E
#17
:n
cpoly
:z
" Notation:
" x,ix  - real and imaginary part of the argument
" c     - name of the list with polynomial coefficients 
"         in descending order
" y,yi  - real and imaginary part of the polynomial value

" Description:
" Evaluation of a polynomial with complex argument using Horner's rule

n:= length(c)
(y,iy):= (c[1],0)
for i=2 to n
   (y,iy):= (y,iy)*(x,ix) + (c[i],0)
next i
/E
E
=r
#1
:r
"   ***  Trigonometric, hyperbolic, logarithmic and  ***
:s
C
#2
:r
"   ***   and other functions of complex variables   ***
:s
C
#4
:r
" This model contains TK versions of 17 functions of complex variables.
:s
C
#5
:r
" Most of them are invertible, such as the following example:
:s
C
#7
:r
(y,iy) = ctan(x,ix)
=p
=t
#1
:s
Screen
:v
Vertical
:f
1
:r
""
:c
""
:t
""
:u
E
=n
=g
#1
:c
.000001
:i
10
:v
Yes
:l
60
:f
66
:m
0
:w
80
:b
Yes
:a
Yes
:r
Yes
:h
No
:t
1
:n
Yes
:d
LPT1
%Br,f,0,1,0,1,0
%Ov,f,1,1,0,1,0
